A CMOS (Complementary Metal Oxide Semiconductor) sensor, which is one of solid-state image sensors, performs so-called line exposure. Therefore, there is a deviation in the timing for charge accumulation of each pixel (photodiode) making up the capturing surface of the CMOS sensor by each line (scanning line) according to a scan timing of each pixel. Thus, when capturing an image using a CMOS sensor in an environment where the brightness of a subject periodically changes such as indoor having a non-inverter type fluorescent light, bright and dark horizontal stripes may be generated in a captured image. The phenomenon that horizontal stripes are generated in a captured mage is referred to as a flicker.
As one of the methods to suppress an occurrence of a flicker in a captured image, there is a method to configure charge accumulation time (shutter speed) of a CMOS sensor to an integral multiple of a blink cycle of a light source (for example see patent citation 1). In an imaging apparatus with adjusted charge accumulation time, light intensity fluctuation of a light source within the charge accumulation time for each pixel is uniformized even if the timing for charge accumulation differs depending on each pixel. Thus the occurrence of a flicker can be suppressed.
For example, a blink frequency of the abovementioned non-inverter type fluorescent light is twice more than a power supply frequency of commercial alternating current power supply. That is, the blink cycle of fluorescent light is 1/100 second in the region with power supply frequency of 50 Hz and 1/120 second in the region with power supply frequency of 60 Hz. Accordingly, in the region with power supply frequency of 50 Hz, the charge accumulation time may be N/100 second and in the region with power supply frequency of 60 Hz, the charge accumulation time may be M/120 second. Here, N and M are positive integers. However in patent citation 1, there are no methods disclosed such as the method to detect a flicker itself and the method to optimize charge accumulation time of a CMOS sensor in response to a detection of a flicker.
In patent citation 2, there is an imaging apparatus disclosed that detects a flicker occurrence using a flicker index value calculated based on an image obtained by a CMOS sensor and switches charge accumulation time according to the detected result.
To be more specific, the imaging apparatus disclosed in patent citation 2 is able to switch the charge accumulation time for the CMOS sensor between first charge accumulation time (for example N/100 second) corresponding to a first power supply frequency (for example 50 Hz) and second charge accumulation time (for example M/120 second) corresponding to a second power supply frequency (for example 60 Hz). Furthermore, the imaging apparatus of patent citation 2 calculates a projection value D which is an accumulation of pixel values for a plurality of pixels included in a predetermined line in a captured image by a CMOS sensor and computes a flicker index value I that indicates an amount of change in the projection output value D between a plurality frames. For example the flicker index value I calculated using images for 4 frames is computed from the following formula (1). Note that in the formula (1), D(n) is a projection output value of a predetermined line in nth frame.
                    I        =                              ∑                          n              =              k                                      k              +              3                                ⁢                                                                D                ⁡                                  (                                      n                    +                    1                                    )                                            -                              D                ⁡                                  (                  n                  )                                                                                                    (        1        )            
Switching the charge accumulation time by the imaging apparatus disclosed in patent citation 2 is performed by comparing a flicker index value I1 with a flicker index value I2. The flicker index value I1 is obtained from an image captured with the first charge accumulation time. The flicker index value I2 is obtained from an image captured with the second charge accumulation time. The imaging apparatus disclosed in patent citation 2 selects the charge accumulation time with a smaller flicker index value. Furthermore, for example, if the flicker index value I1 has increased more than a predetermined threshold when configured to the first charge accumulation time, switching from the first charge accumulation time to the second charge accumulation time is performed.
[Patent Citation 1]
    Japanese Unexamined Patent Application Publication No. 2003-189172[Patent Citation 2]    Japanese Unexamined Patent Application Publication No. 2002-84466